Solved: Func Module 'READ | 您所在的位置:网站首页 › abap module › Solved: Func Module 'READ |
Hi Binoo The FM READ_TEXT allows to read a standard text in a program. You can read all type standard text, particolarly the text linked to document (sales order, bill, invoice,....) and several objects (material, customer, vendor,...). If you go to std transaction, for example VA03 (to dipslay sale order) and then go to text header, you can see all standard texts of the document (left column). If you do a doubleclick on a text, the system'll show you the text (long text) at the right side, so if you do a double click on long text the system'll open the editor where you can change the text and see the header data of this text. The key of each text is formed by thead-tdobject => Object type thead-tdname => Text name thead-tdid => Text id (subobject) thead-tdspras => Text language ID You can always find out these informations to use fm READ_TEXT. You should know the ID of the text you want to read (You can see in the customizing to know which texts are linked to your object) and find out the text name in the program. For example in the purchase document: The object type of header text is EKKO (like name of the table); the object type of item is EKPO. You should know which texts of header or item you have to read: each text has own ID, for ex: - 0001 - Notes - 0002 - Text to print .............. See the customizing: for each object there are standard text but also it can be texts created by functional. In you program you should only find out the name of the text. It usuallu is the key of the object, so in this example is the number of order for header text and number plus item number for item text. So if you're reading header dat: select single * from ekko where ebeln = p_ebeln. thead-tdobject = 'EKKO'. thead-tdname = ekko-ebeln. thead-tdid = '0001'. You should check the language used to create the text: it can be the vendor language, the order language or the language of your system thead-tdspras = ekko-spras. If you want to read ian item text: thead-tdobject = 'EKPO'. concatenate ekpo-ebeln ekpo-ebelp into thead-tdname. thead-tdid = '0001'. It's better to check if there is the text, you can do it by reading table STXH. CALL FUNCTION 'READ_TEXT' EXPORTING client = sy-mandt id = thead-tdid language = thead-tdspras name = thead-tdname object = thead-tdobject TABLES lines = inline EXCEPTIONS id = 1 language = 2 name = 3 not_found = 4 object = 5 reference_check = 6 wrong_access_to_archive = 7 OTHERS = 8. Max Message was edited by: max bianchi Message was edited by: max bianchi |
CopyRight 2018-2019 实验室设备网 版权所有 |